let str = "admin";

const base64Str = new Buffer(str).toString("base64");

console.log(base64Str);

const yStr = new Buffer(base64Str, "base64").toString();

console.log(yStr);

const fs = require("fs");
const path = require('path');
const crypto = require('crypto');

fs.readFile(path.join(process.cwd(), './file.txt'), (err,txt) => {

    setImmediate(() => {
        console.log('本次事件执行完毕后执行');
    })
    console.log(new Buffer(txt).toString("base64"));
    const sha1 = crypto.createHash("sha1");
    sha1.update(txt);
    console.log(sha1.digest("hex"))
    setTimeout(()=>{console.log('kkk')})
})
